Skip to content

fix: use absolute paths for gsd-tools.cjs in all install types (#820)#960

Open
RyanAlberts wants to merge 1 commit intogsd-build:mainfrom
RyanAlberts:fix/820-absolute-path-resolution
Open

fix: use absolute paths for gsd-tools.cjs in all install types (#820)#960
RyanAlberts wants to merge 1 commit intogsd-build:mainfrom
RyanAlberts:fix/820-absolute-path-resolution

Conversation

@RyanAlberts
Copy link

Summary

  • pathPrefix in bin/install.js now always resolves to an absolute path via path.resolve(targetDir), eliminating $HOME and ~ references in installed workflow/agent/reference files
  • All $HOME/.claude/ replacement sites use the absolute prefix directly instead of toHomePrefix() (which re-introduced $HOME)
  • Codex installer uses absolute path for get-shit-done prefix
  • Removed the now-unused toHomePrefix() function

Problem

When GSD is installed locally (.claude/get-shit-done/), all 35+ workflow and reference files hardcode:

node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" ...

This breaks in two scenarios:

  1. Local installs outside $HOME — project on external drive, symlinked path, or Docker volume where $HOME/.claude/get-shit-done/ doesn't exist
  2. Spawned subagents with empty $HOME — Opus and other models spawn agents where $HOME is unset, causing the path to resolve to /.claude/get-shit-done/bin/gsd-tools.cjs

Fix

Instead of converting paths back to $HOME-relative form, the installer now writes fully resolved absolute paths into all installed files:

# Before (breaks for local installs and empty $HOME)
node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" ...

# After (always works)
node "/full/path/to/project/.claude/get-shit-done/bin/gsd-tools.cjs" ...

Test plan

  • All 535 existing tests pass (0 failures)
  • Local install: verified installed workflows contain absolute paths, zero $HOME references in gsd-tools.cjs paths
  • Global install: verified installed workflows contain absolute paths
  • Empty $HOME simulation: verified gsd-tools.cjs resolves correctly with HOME=""
  • No leaked .claude paths in non-Claude runtimes (installer's built-in verification passes)

Closes #820

Related: #842, #852, #870

Made with Cursor

…uild#820)

Local installs wrote $HOME/.claude/get-shit-done/bin/gsd-tools.cjs into
workflow files, which breaks when GSD is installed outside $HOME (e.g.
external drives, symlinked projects) and when spawned subagents have an
empty $HOME environment variable.

- pathPrefix now always resolves to an absolute path via path.resolve()
- All $HOME/.claude/ replacements use the absolute prefix directly
- Codex installer uses absolute path for get-shit-done prefix
- Removed unused toHomePrefix() function

Tested: 535/535 existing tests pass, verified local install produces
correct absolute paths, verified global install unchanged, verified
empty $HOME scenario resolves correctly.

Closes gsd-build#820

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Local install: gsd-tools.cjs path hardcodes $HOME, breaks for local installs

2 participants